package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CreditRoomMapper;
import com.ruoyi.system.domain.CreditRoom;
import com.ruoyi.system.service.ICreditRoomService;

/**
 * 房源信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-01-01
 */
@Service
public class CreditRoomServiceImpl implements ICreditRoomService 
{
    @Autowired
    private CreditRoomMapper creditRoomMapper;

    /**
     * 查询房源信息
     * 
     * @param roomId 房源信息主键
     * @return 房源信息
     */
    @Override
    public CreditRoom selectCreditRoomByRoomId(Long roomId)
    {
        return creditRoomMapper.selectCreditRoomByRoomId(roomId);
    }

    /**
     * 查询房源信息列表
     * 
     * @param creditRoom 房源信息
     * @return 房源信息
     */
    @Override
    public List<CreditRoom> selectCreditRoomList(CreditRoom creditRoom)
    {
        return creditRoomMapper.selectCreditRoomList(creditRoom);
    }

    /**
     * 查询可用的房源信息列表
     * 
     * @return 房源信息
     */
    @Override
    public List<CreditRoom> selectAvailableCreditRoomList()
    {
        return creditRoomMapper.selectAvailableCreditRoomList();
    }

    /**
     * 新增房源信息
     * 
     * @param creditRoom 房源信息
     * @return 结果
     */
    @Override
    public int insertCreditRoom(CreditRoom creditRoom)
    {
        return creditRoomMapper.insertCreditRoom(creditRoom);
    }

    /**
     * 修改房源信息
     * 
     * @param creditRoom 房源信息
     * @return 结果
     */
    @Override
    public int updateCreditRoom(CreditRoom creditRoom)
    {
        return creditRoomMapper.updateCreditRoom(creditRoom);
    }

    /**
     * 批量删除房源信息
     * 
     * @param roomIds 需要删除的房源信息主键
     * @return 结果
     */
    @Override
    public int deleteCreditRoomByRoomIds(Long[] roomIds)
    {
        return creditRoomMapper.deleteCreditRoomByRoomIds(roomIds);
    }

    /**
     * 删除房源信息信息
     * 
     * @param roomId 房源信息主键
     * @return 结果
     */
    @Override
    public int deleteCreditRoomByRoomId(Long roomId)
    {
        return creditRoomMapper.deleteCreditRoomByRoomId(roomId);
    }
} 